<?php

require_once( 'flexical/service/system.php' );

abstract class Flexical_Service_CAO
{
	public $cache_location;

	public $cache_duration;

	public function __construct( $cache_location = null, $cache_duration = -1 )
	{
		$this->system = new Flexical_Service_System();

		$this->cache_location = $cache_location == null ? $this->system->get_cache_dir() : $cache_location;
		$this->cache_duration = $cache_duration < 0 ? $this->system->get_cache_duration() : $cache_duration;
	}

	// Throws Flexical_Service_CAO_Exception
	abstract public function read_feeds( $username, $password );

	// Throws Flexical_Service_CAO_Exception
	abstract public function test_feed( $feed );

	// Throws Flexical_Service_CAO_Exception
	abstract public function read_events( $feed, $query );
}

?>
